package jsyf.oa.entity.wreport;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * Created by Lenovo on 2017/11/24.
 */
@Entity
@Table(name = "T_WRT_MODULE", schema = "oa", catalog = "")
public class ModuleEntity extends BaseEntity implements Serializable {
    private String name;
    private String eName;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEName() {
        return eName;
    }

    public void setEName(String eName) {
        this.eName = eName;
    }

    public JSONObject getJSONObject(){
        JSONObject obj = new JSONObject();
        obj.put("ID", this.getId());
        obj.put("NAME", this.getName());
        obj.put("E_NAME", this.getEName());

        return obj;
    }

    @Override
    public String getTableName() {
        return "T_WRT_MODULE";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID","id");
        obj.put("NAME", "name");
        obj.put("E_NAME","eName");

        return obj;
    }
}
